with v8.Class_String;
package v8.Class_Stack_Frame is
   type Stack_Frame (<>) is tagged limited private;
   type Pointer is access all Stack_Frame;
   -- A single JavaScript stack frame.

   function Get_Line_Number (this : Stack_Frame) return int;
   -- Returns the number, 1-based, of the line for the associate function call.
   -- This method will return Message::kNoLineNumberInfo if it is unable to
   -- retrieve the line number, or if kLineNumber was not passed as an option
   -- when capturing the Stack_Trace.

   function Get_Column (this : Stack_Frame) return int;
   -- Returns the 1-based column offset on the line for the associated function
   -- call.
   -- This method will return Message::kNoColumnInfo if it is unable to retrieve
   -- the column number, or if kColumnOffset was not passed as an option when
   -- capturing the Stack_Trace.

   function Get_Script_Name (this : Stack_Frame) return v8.Class_String.Pointer;
   -- Returns the name of the resource that contains the script for the
   -- function for this Stack_Frame.

   function Get_Script_Name_Or_Source_URL (this : Stack_Frame) return v8.CLass_String.Pointer;
   -- Returns the name of the resource that contains the script for the
   -- function for this StackFrame or sourceURL value if the script name
   -- is undefined and its source ends with //@ sourceURL=... string.

   function Get_Function_Name (this : Stack_Frame) return v8.Class_String.Pointer;
   -- Returns the name of the function associated with this stack frame.

   function Is_Eval (this : Stack_Frame) return bool;
   -- Returns whether or not the associated function is compiled via a call to eval

   function Is_Constructor (this : Stack_Frame) return bool;
   -- Returns whether or not the associated function is called as a
   -- constructor via "new".

private
   type Stack_Frame is tagged limited null record;


   pragma Import (CPP, Get_Line_Number, "_ZNK2v810StackFrame13GetLineNumberEv");
   pragma Import (CPP, Get_Column, "_ZNK2v810StackFrame9GetColumnEv");
   pragma Import (CPP, Get_Script_Name, "_ZNK2v810StackFrame13GetScriptNameEv");
   pragma Import (CPP, Get_Script_Name_Or_Source_URL, "_ZNK2v810StackFrame24GetScriptNameOrSourceURLEv");
   pragma Import (CPP, Get_Function_Name, "_ZNK2v810StackFrame15GetFunctionNameEv");
   pragma Import (CPP, Is_Eval, "_ZNK2v810StackFrame6IsEvalEv");
   pragma Import (CPP, Is_Constructor, "_ZNK2v810StackFrame13IsConstructorEv");
end v8.Class_Stack_Frame;
